<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>游戏新闻</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>

</head>

<body>
    <div id="app">

        <news-list :style="style" v-for="obj in newsList" :key=obj.id>
            <template v-slot:title>
                <h3>{{obj.title}}</h3>
            </template>
            <template v-slot:source>
                <span>
                    来源:<a :href="obj.url">{{obj.source}}</a>
                </span>
                <span :style="{float:'right'}">{{obj.ctime}}</span>
            </template>
            <template v-slot:des>
                <p>{{obj.description}}</p>
                <div>
                    <img :src="obj.picUrl" alt="failed">
                </div>
            </template>  
        </news-list>
    </div>


    <script type="module" src="./js/index.js"></script>
</body>

</html>